package org.homeworkadmin.admin.service.impl;

import org.homeworkadmin.admin.domain.Post;
import org.homeworkadmin.admin.mapper.PostMapper;
import org.homeworkadmin.admin.service.PostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class PostServiceImpl implements PostService {
    @Autowired
    private PostMapper postMapper;

    @Override
    public int getPostCount(String postType) {
        return postMapper.getPostCount(postType);
    }

    @Override
    public List<Post> getPost(String postType,int pagesize,int currpage) {
        return postMapper.getPost(postType, pagesize, currpage);
    }

    @Override
    public int check(int postId, String status) {
        return postMapper.check(postId, status);
    }
}
